package com.example.day06.dao;

import com.example.day06.pojos.Course;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wuyunbin
 */
@Mapper
public interface CourseMapper {
    @Insert("INSERT INTO `tb_course` (id,name) VALUES (#{id},#{name})")
    int insert(Course course);

    @Select("select id,name from tb_course")
    List<Course> selectAll();
}
